package com.example.base_kotlin_xml

/**
 * @Author: jiangKunKun
 * @CreateDate: 2025/10/17
 * @Description:
 * @SpittingGrooves:
 */
class Calculator {
    fun add(a: Int, b: Int): Int = a + b

    fun subtract(a: Int, b: Int): Int = a - b

    fun multiply(a: Int, b: Int): Int = a * b

    fun divide(a: Double, b: Double): Double {
        if (b == 0.0) throw IllegalArgumentException("Cannot divide by zero")
        return a / b
    }
}